﻿using System;
using System.Collections.Generic;
using UnityEngine;
public class UnitCollisionComponent : MonoBehaviour 
{
    public object param = null;
    public Action<Collision2D> OnCollision;//碰撞回调



    private void OnCollisionEnter2D(Collision2D collision)
    {
        //Debug.Log("------OnCollisionEnter2D------->"+ collision.collider.name + "  >> "+ collision.otherCollider.gameObject.name);
        OnCollision?.Invoke(collision);
    }
}